/* ========================================================
 * $Id: weblinks_gmap_block.js 236 2008-03-03 13:38:35Z mikhail.miguel $
 * http://www.google.com/apis/maps/
 * ========================================================
 */

function weblinks_gm_b_show( gmap, point, info_arr ) 
{
	gmap.addControl( new GSmallMapControl() );
	gmap.addControl( new GMapTypeControl() );
	gmap.setCenter( new GLatLng( parseFloat( point[0] ) , parseFloat( point[1] ) ) , Math.floor( point[2] ) );
	for( i=0 ; i<info_arr.length ; i++ ){
		gmap.addOverlay( weblinks_gm_b_create_marker( info_arr[i] ) );
	}
}

function weblinks_gm_b_create_marker( info ) 
{
	var marker = new GMarker( new GLatLng( parseFloat( info[0] ) , parseFloat( info[1] ) ) );
	GEvent.addListener( marker , "click" , function() {
		marker.openInfoWindowHtml( info[2] );
	});
	return marker;
}
